var { getInventoryList, getcommodity, addcommodity, deltcommodity, updatecommodity, submitcommodity, getInventoryList, updateInventory, addInventory, removeInventory, quireInventory , getInventoryById,getInventoryList, getcommodity, addcommodity, deltcommodity, inquirecommodity, updatecommodity, submitcommodity, getInventoryList, updateInventory, addInventory, removeInventory , getAllInventory} = require("../dao/merchantDao");
// var { getInventoryList, getcommodity, addcommodity, deltcommodity, updatecommodity, submitcommodity, getInventoryList, updateInventory, addInventory, removeInventory, quireInventory , getInventoryById} = require("../dao/merchantDao");

module.exports.getInventoryList = async function (data) {
    return await getInventoryList(data);
}
module.exports.getAllInventory = async function (data) {
    return await getAllInventory(data);
}
//获取商品
module.exports.getcommodity = async function (data) {
    
    if(data.lei){
        return await inquirecommodity(data)
    }else{
        return await getcommodity(data)
    }
        
}
  
//添加商品
module.exports.addcommodity = async function (data) {
    return await addcommodity(data)
}
//删除商品
module.exports.deltcommodity = async function (data) {
    return await deltcommodity(data)
}
//显示修改商品
module.exports.updatecommodity = async function (data) {
    return await updatecommodity(data)
}
//修改商品
module.exports.submitcommodity = async function (data) {
    return await submitcommodity(data)
}
// //查询商品
// module.exports.inquirecommodity=async function(data){
//     return await inquirecommodity(data)
// }
// 库存部分
module.exports.updateInventory = async function (data) {
    return updateInventory(data);
}
module.exports.addInventory = async function (data) {
    return await addInventory(data);
}
module.exports.removeInventory = async function (data) {
    return await removeInventory(data);
}

module.exports.quireInventory = async function (data) {
    return await quireInventory(data);
}
module.exports.getInventoryById=async function(data){
    return await getInventoryById(data);
}
// 库存结束
